import json
from datetime import datetime
import pandas as pd
import os
import sys

LAST_ID = ""

def get_txt():
    base_path = os.path.dirname(os.path.realpath(sys.argv[0]))
    excel_path = os.path.join(base_path, "货位标签模板.xlsx")
    df = pd.read_excel(excel_path, sheet_name="Sheet1",usecols=["货位"],engine="calamine")
    if df.empty:
        print("excel为空")
    print_data = []
    for index, row in df.iterrows():
        print_data.append({
            "name": row["货位"],
            "txt_value": '',
        })
    json_str = json.dumps(print_data)
    print(json_str)

get_txt()
